<div id="information">
<br />
<?php
$a = strip_tags(addslashes(trim(htmlspecialchars($_GET['name']))));
$b = strip_tags(addslashes(trim(htmlspecialchars($_GET['module']))));
?>
<h3 class="form_h3">Уроци по <?php echo $a; ?></h3><br /><br />
<?php   
   if($_GET['moda']=="delete"){
     $delete_articles='DELETE FROM articles WHERE article_id="'.$_GET['id'].'"';
	 $results_delete_articles=mysql_query($delete_articles);
			 
	 echo '
	 <script type="text/javascript">
		alert("Успешно Изтриване!");
	 </script>
	 ';
	echo '<meta http-equiv="refresh" content="0;url=see_module.php?module='.$_GET['module'].'&amp;name='.$_GET['name'].'">';
   } else {
   $sel_art = mysql_query('SELECT * FROM articles WHERE place = "'.$b.'" ORDER BY date_added DESC');
   
   if(mysql_num_rows($sel_art) == 0){
      echo '<p class="error">Няма уроци към този раздел!</p>';
   } else {
   
   $sel_module = mysql_query('SELECT to_tutorial FROM modules WHERE name = "'.$b.'"');
   $row_module = mysql_fetch_assoc($sel_module);

   $select_user = mysql_query('SELECT type FROM users WHERE username = "'.$_SESSION['username'].'"');
   $row_user = mysql_fetch_assoc($select_user);
   while($row_art = mysql_fetch_assoc($sel_art)){
   ?>
	   <div class="article">
	   <p style="text-align: center; font-weight: bold;"><?php echo '<a href="see_articles.php?name='.$a.'&amp;module='.$b.'&amp;id='.$row_art['article_id'].'" style="color: #444; font-size: 16px">'.$row_art['article_name'].'</a>'; ?></p>
	   <p style="margin-left: 25px; text-indent: 10px; margin-right: 25px;"><?php echo $row_art['article_descr']; ?></p>
	   <p style="text-align: right; margin-right: 25px;">
	   <?php
		$select_u=mysql_query('SELECT type, username FROM users WHERE username="'.$_SESSION['username'].'"');
	    $row_u=mysql_fetch_assoc($select_u);
	   
        echo "Добавено на: ".date('d-m-Y', $row_art[date_added])." от <b>".$row_art['from_who'] . "</b></p>";
	   ?>
	   </div>
	   <br />
   <?php
   }
   }
   }
?>
</div>